<template>
  <div>
    <button @click="showClose = !showClose">{{ showClose ? '加载时钟' : '销毁时钟' }}</button>
    <Clock v-if="!showClose"></Clock>
  </div>
</template>

<script>
import Clock from "@/components/Clock.vue";

export default {
  name: "lifeCycle",
  data() {
    return {
      showClose: false
    };
  },
  components: {
    Clock
  }
};
</script>